import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import { jsx as _jsx } from "react/jsx-runtime";
import { Slider } from 'antd-v4';
import React from 'react';
import { createField } from '../../BaseForm/createField';
/**
 * 文本选择组件
 *
 * @param
 */

var BaseProFormSlider = function BaseProFormSlider(_ref, ref) {
  var fieldProps = _ref.fieldProps,
      min = _ref.min,
      max = _ref.max,
      step = _ref.step,
      marks = _ref.marks,
      vertical = _ref.vertical,
      range = _ref.range;
  return _jsx(Slider, _objectSpread(_objectSpread({
    min: min,
    max: max,
    step: step,
    marks: marks,
    vertical: vertical,
    range: range
  }, fieldProps), {}, {
    ref: ref
  }));
};

var ProFormSlider = createField( /*#__PURE__*/React.forwardRef(BaseProFormSlider), {
  lightFilterLabelFormatter: function lightFilterLabelFormatter(value) {
    if (Array.isArray(value)) {
      return value.join('~');
    }

    return value;
  }
});
export default ProFormSlider;